/**
 * 学生新增
 */
function addStudent() {
	let stuName = document.getElementById("stuName").value
	let stuAge = document.getElementById("stuAge").value
	$.ajax({
		url: "/JDBC/studentAction?method=addStudent",
		type: "post",
	
	    data: {"stuName": stuName, "stuAge": stuAge},
	    success: function(data) {
		alert(data);
	    	console.log(data);
	    },
	    error: function(error) {
	    	console.log(error)
	    }
	})
}
/**
 * 查询学生
 */
function findStudent() {
	$.ajax({
		url: "/JDBC/queryStudentAction?method=queryStudent",
		type: "post",
	
	    success: function(data) {
			alert("查询成功，请在浏览器控制台查看")
	    	console.log(JSON.parse(data));
	    },
	    error: function(error) {
	    	console.log(error)
	    }
	})
}


